<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <link rel="stylesheet" type="text/css" href="<?php echo $base_url.$css."/login.css";?>" />
        <script type='text/javascript' src=<?php echo $base_url.$js."/jquery-1.8.2.min.js"; ?> ></script>
        <script type="text/javascript">
        function notify(notice){
	       $(document).ready(function(){
                $("#notice").text(notice);
            });
		
        }
	
        function error(){
	       if(document.login.username.value==""){
		      notify("Chưa điền tên đăng nhập");
		      return false;
	       }
	       else
	           if(document.login.password.value==""){
		          notify("Chưa nhập mật khẩu");
		          return false;		
	           }
	       return true;	
        }
        </script>
    </head>
    
    <body>
    
        <div id="login">
            <img src="<?php echo base_url(); ?>resources/images/logo_sunnet.jpg" width="200" height="177" />
            <h3>CÔNG TY CỔ PHẦN GIẢI PHÁP <br />CNTT-TT SUNNET</h3>
            <div id="notice">
                <?php
                    if((isset($error))&&($error !== false)){
                        echo $error;
                    }
                ?>
            </div>
            
            <form name="login" action="
            <?php 
            if(isset($returnUrl) && ($returnUrl !== false)){
                echo $base_url."/index/authen/?returnUrl=".$returnUrl;
            } else{
                echo $base_url."/index/authen";
            }
            ?>" method="post" onsubmit="return error();">
                <table cellpadding="2" style="margin: auto;">
                    <tr>
                        <td>Tên đăng nhập:</td>
                        <td><input type="text" name="username" size="25" maxlength="50" class="textbox"/></td>
                    </tr>
                    <tr>
                        <td>Mật khẩu:</td>
                        <td><input type="password" name="password" size="25" maxlength="50" class="textbox"></td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td><input type="submit" name="login" value="Đăng nhập" class="button"></td>
                    </tr>
                </table>
            </form>
        </div>

    </body>

</html>